class Admin::Weixin::UsersController < AdminController

  # GET /admin/weixin/users
  # GET /admin/weixin/users.json
  def index
    @weixin_users = WeixinUser.by_weixin_group_id(params[:wx_id]).page(params[:page])
    @weixin_groups = WeixinGroup.all
  end


  def update
    render :json => {followres_count: $fetch_thread[:followres_count].to_f, completed: $fetch_thread[:completed].to_f}
  end

  def fetch
    WeixinUser.fetch
    redirect_to action: :index
  end

  def destroy
    $fetch_thread.exit
    redirect_to action: :index
  end

end
